home *** CD-ROM | disk | FTP | other *** search
- #ifndef LIBRARIES_MXBASE_H
- #define LIBRARIES_MXBASE_H
- /*
- ** $VER: matrix.h 24.0 (19.05.95)
- ** Includes Release 40.5
- **
- ** Matrix definitions
- **
- ** (C) Copyright 1990-95 David Swasbrook
- ** All Rights Reserved
- */
-
- /*****************************************************************************/
-
- #ifndef EXEC_LIBRARIES_H
- #include <exec/libraries.h>
- #endif
-
- #ifndef UTILITY_TAGITEM_H
- #include <utility/tagitem.h>
- #endif
-
-
-
- /*****************************************************************************/
-
- #define MATRIXNAME "matrix.library"
- #define MX_TagBase TAG_USER+0x80000
-
- /*****************************************************************************/
-
- struct MatrixBase {
- struct Library LibNode;
- /*** PRIVATE FIELDS FOLLOW ***/
- APTR SysLib;
- APTR SegList;
- APTR DOSBase;
- };
-
-
- struct MatrixAslInfo {
- WORD mxai_LeftEdge;
- WORD mxai_TopEdge;
- WORD mxai_Width;
- WORD mxai_Height;
- WORD mxai_expansion;
- };
-
- /**********************************************************************
- */
- struct WindowHandler {
- UBYTE wh_Active; /* Cler to close and exit */
- UBYTE wh_SigBit;
- struct Window *wh_Window; /* Pointer to the window */
- struct MsgPort *wh_UserPort; /* UserOrt of window */
- APTR wh_MenuStrip;
- UWORD wh_Exp;
- APTR wh_fs;
- APTR wh_gv;
- APTR wh_mv;
- APTR wh_tl;
- ULONG wh_ReturnVal; /* Writeable, value returned in d1 on exit */
- ULONG wh_UserData; /* User */
- APTR wh_VisualInfo;
- struct List *wh_BevBoxList;
- APTR wh_RemakeWindow;
- UBYTE wh_Flags;
- UBYTE wh_FlagsPad[2];
- UBYTE wh_LViewBarWidth; /* Defaults to 16 */
- struct TextAttr *wh_GadgetFont;
- struct Locale *wh_Locale;
- struct Catalog *wh_Catalog; /* struct catalog * */
- ULONG *wh_CatCompArray; /* (*ULONG) (*/
- struct Catalog *wh_MxCatalog; /* struct catalog * */
- APTR wh_ASLInfo;
- struct Gadget *wh_ControlListView;
- /* Private fields follow */
- struct Font *wh_MXFont;
- struct TextAttr wh_MXTextAttr;
- struct MatrixAslInfo wh_ASLInfoStruct;
-
- };
- /* do not make any assumptions on the size of this structure for it will
- surely change as modifications are made, where possible every effort is
- made to maintain the current settings.
- */
-
-
-
- /*****************************************************************************/
- /* CONSTANTS for MX_GetCatalogStr() */
- #define MXCC_PACKEDLIST -1
- #define MXCC_OFFSETLIST -2
-
- struct MxBoxGad {
- struct Node Node;
- APTR Hook; /* Private */
- WORD X;
- WORD Y;
- WORD Width;
- WORD Height;
- };
-
- #define MX_BUTTON 0x0001
- #define MX_CHECKBOX 0x0005
- #define MX_TEXT 0x0008
- #define MX_TEXTBOX 0x0009
- #define MX_FONT 0x0014
- #define MX_SCREENBUTTON 0x0016
- #define MX_HOOKCYCLE 0x0023
- #define MX_STRGAD 0x0040
- #define MX_NUMBER 0x0100
- #define MX_LISTVIEW 0x0111
- #define MX_SLIDER 0x0151
- #define MX_FILEBUTTON 0x0170
- #define MX_TABGAD 0x0300
-
- #define MX_BOX 0x8020
- /* #define MX_BOX 0x8021 - this is the CSL BOX - yukky */
- #define MX_HORIZLINE 0x8022
- #define MX_GADPTR 0x8100
- #define MX_BOXPTR 0x8104
- #define MX_DISABLE 0x8120
- #define MX_LOCALIZE 0x8125
- #define MX_DOWNHALF 0x8128
- #define MX_SETKEYHOOK 0x8129 /* changes last hot key to a Hook( WH )( A0 ) */
-
-
- #define ID_IGNORE 0
- #define ID_BYTE 1
- #define ID_WORD 2
- #define ID_LONG 4
-
- #define ID_HOOK 10
-
- #define ID_CHK 20 /* See tags for extension fields */
- #define ID_STR 52
- #define ID_BUT 55
- #define ID_TXT 57
- #define ID_SCREEN 63
- #define ID_FONT 65
- #define ID_VBUT 155 /* UserData = Return code for window handler */
- #define ID_LVIEW 162
- #define ID_TABGAD 300
- #define ID_SLIDER 401
- #define ID_FILEBUTTON 420
- #define ID_HOOKCYCLE 1011
-
-
-
- #define KEY_IGNORE 0
- #define KEY_GADGETUP 1
- #define KEY_ACTIVATE 2
- #define KEY_CHECKBOX 3
- #define KEY_SLIDER 5
- #define KEY_HOOK 6 /* Hook( WH )( A0 ) */
-
-
-
- /*****************************************************************************/
- /* TAGS FOR MX_CHECKBOX type gadgets */
- /* #define MXCBT_Hook MX_TagBase+0xA100 Obsolete, see MXCBT_CallBackHook */
- #define MXCBT_Shrink MX_TagBase+0xA101 /* Gadget width and height will be reduced, set to ~0 */
- #define MXCBT_CallBackHook MX_TagBase+0xA102 /* void Hook(Hook,Gadget,WindowHandler) */
-
- /*****************************************************************************/
- /* TAGS FOR MX_GetScreenNameTagList() */
-
- #define MXSN_Flags MX_TagBase+0xA200 /* */
- #define MXSN_Labels MX_TagBase+0xA201 /* */
-
- /*****************************************************************************/
- /* TAGS FOR MX_GetFont() and MX_FreeFont() */
-
- #define MXGF_FontName MX_TagBase+0xF001
- #define MXGF_FontSize MX_TagBase+0xF002
- #define MXGF_UseScreenFont MX_TagBase+0xF003
- #define MXGF_FontSizeStr MX_TagBase+0xF004
- #define MXGF_FontStyle MX_TagBase+0xF005
-
- /*****************************************************************************/
- /* TAGS FOR MX_AddVBlankNode() and MX_RemVBlankNode() */
-
- #define MXVB_HookAddress MX_TagBase+0xF101
- #define MXVB_UserData MX_TagBase+0xF102
- #define MXVB_SigBit MX_TagBase+0xF103
- #define MXVB_Count MX_TagBase+0xF104
-
- /*****************************************************************************/
-
-
- struct MXScreenMode {
- ULONG DisplayID;
- ULONG Width;
- ULONG Height;
- UWORD Depth;
- };
-
- struct MxScreenMode {
- ULONG mxsm_displayid;
- ULONG mxsm_width;
- ULONG mxsm_height;
- UWORD mxsm_depth;
- };
-
- #define mxsbB_FixedDimensions 0
- #define mxsbF_FixedDimensions 1<<mxsbB_FixedDimensions
- #define mxsbB_FixedDepth 1
- #define mxsbF_FixedDepth 1<<mxsbB_FixedDepth
-
- #define MXSBF_FIXEDDIMENSIONS 1<<0
- #define MXSBF_FIXEDDEPTH 1<<1
- #define MXSBF_STRINGPOINTER 1<<7
-
-
-
- /*****************************************************************************/
- /* Tags for SCREEN type gadgets */
- #define MXSMR_AslTags MX_TagBase+0xA000
- #define MXSMR_PlaceBox MX_TagBase+0xA001
- /* Placement for textbox, defualt = PLACETEXT_RIGHT
- MSupported placetext modes: PLACETEXT_RIGHT, PLACETEXT_ABOVE ,PLACETEXT_BELOW
- */
- #define MXSMR_Flags MX_TagBase+0xA002
- #define MXSMR_NewDisplayModeHook MX_TagBase+0xA003
- /*
- struct Hook *, Hook( *Hook, *MxScreenMode, *WindowHandler)
- This does not fit in with current conventions of Hook( Hook, Gadget, WindowHandler )
- */
-
-
- /*****************************************************************************/
- /* TAGS FOR MX_AddVBlankNode() and MX_RemVBlankNode() */
- #define MXTFL_LineLength MX_TagBase+0xF0B1
- #define MXTFL_NodeSize MX_TagBase+0xF0B2
- #define MXTFL_SplitLines MX_TagBase+0xF0B3
- #define MXTFL_FileHandle MX_TagBase+0xF0B4
- #define MXTFL_SourceBuffer MX_TagBase+0xF0B5
- #define MXTFL_LeadingSpaces MX_TagBase+0xF0B6
- #define MXTFL_MemAttr MX_TagBase+0xF0B7
- #define MXTFL_AllocateStrings MX_TagBase+0xF0B8
- #define MXTFL_AllocateFullLine MX_TagBase+0xF0B9
- #define MXTFL_AllocateLNNAME MX_TagBase+0xF0BA
- /*****************************************************************************/
-
- /*****************************************************************************/
- /* TAGS FOR MX_NewSaveIFF(), MX_NewLoadIFF() (V23) */
- #define MXIF_Filename MX_TagBase+0x2101
- #define MXIF_CreateDir MX_TagBase+0x2102
- #define MXIF_Type MX_TagBase+0x2103
- #define MXIF_HunkArray MX_TagBase+0x2104
- #define MXIF_ValidateHook MX_TagBase+0x2105
- #define MXIF_ANNO MX_TagBase+0x2106
-
- #define MXIF_Raw 0
- #define MXIF_HookMulti MX_TagBase+0x2200
- #define MXIF_HookOwnchunk MX_TagBase+0x2201
- #define MXIF_String MX_TagBase+0x2202
-
-
-
- /*****************************************************************************/
- /* TAGS FOR MX_NewPrefsWH (V23) */
- #define MXPF_WHTags MX_TagBase+0x2000
- #define MXPF_DefaultHook MX_TagBase+0x2001
- #define MXPF_ASLInfo MX_TagBase+0x2002
- #define MXPF_LoadSaveDir MX_TagBase+0x2003
- #define MXPF_Title MX_TagBase+0x2004
- #define MXPF_LoadTitle MX_TagBase+0x2005
- #define MXPF_SaveTitle MX_TagBase+0x2006
- #define MXPF_Window MX_TagBase+0x200a
- #define MXPF_Screen MX_TagBase+0x200b
- #define MXPF_VisualInfo MX_TagBase+0x200c
- #define MXPF_PubScreenName MX_TagBase+0x200d
- #define MXPF_IFFTags MX_TagBase+0x2010
- #define MXPF_SaveFile MX_TagBase+0x2011
- #define MXPF_UseFile MX_TagBase+0x2012
- #define MXPF_InitialLoad MX_TagBase+0x2013
- #define MXPF_EnvName MX_TagBase+0x2014
- #define MXPF_NewDataHook MX_TagBase+0x2021
- #define MXPF_PreSaveHook MX_TagBase+0x2022
- #define MXPF_PreLoadHook23 MX_TagBase+0x2023
- #define MXPF_TagMorePointer MX_TagBase+0x202a
- #define MXPF_Font MX_TagBase+0x2030
- #define MXPF_QuitMenuHook MX_TagBase+0x2031
- #define MXPF_AboutMenuHook MX_TagBase+0x2032
- #define MXPF_HelpMenuHook MX_TagBase+0x2033
- #define MXPF_CallBack MX_TagBase+0x2035
-
- /*** Methods for MXPF_CallBack() ***/
- #define MXPFCB_LOAD 1
- #define MXPFCB_SAVE 2
- #define MXPFCB_DEFAULT 3
-
- /*** Result codes for MXPF_CallBack() ***/
- #define MXPFCB_OK 0
- #define MXPFCB_UNKNOWN ~0
-
-
-
-
- #define MXWINPOS_CENTER 0
- #define MXWINPOS_INPARENT 1
- #define MXWINPOS_CENTERPARENT 2
-
- #define MXWH_Gadgets MX_TagBase+0x01
- #define MXWH_Menus MX_TagBase+0x02
- #define MXWH_Handler MX_TagBase+0x03
- #define MXWH_Events MX_TagBase+0x04
- #define MXWH_Signals MX_TagBase+0x05
- #define MXWH_SignalHandler MX_TagBase+0x06
- #define MXWH_Position MX_TagBase+0x07
- #define MXWH_Flags MX_TagBase+0x08
- #define MXWH_WindowSize MX_TagBase+0x09
- #define MXWH_WindowTitle MX_TagBase+0x0A
- #define MXWH_ScreenTitle MX_TagBase+0x0B
- #define MXWH_PositionWindow MX_TagBase+0x0C
- #define MXWH_MenusLocalize MX_TagBase+0x0D
- #define MXWH_InitCode MX_TagBase+0x10
- #define MXWH_IDCMPFlags MX_TagBase+0x11
- #define MXWH_CreateGadTags MX_TagBase+0x12
- #define MXWH_WorkbenchScreen MX_TagBase+0x13
- #define MXWH_TitleCountTo MX_TagBase+0x14
- #define MXWH_NoDrag MX_TagBase+0x15
- #define MXWH_NoDepth MX_TagBase+0x16
- #define MXWH_Centre MX_TagBase+0x17
- #define MXWH_ScreenToFront MX_TagBase+0x18
- #define MXWH_ESCAddress MX_TagBase+0x19
- #define MXWH_ESCvalue MX_TagBase+0x20
- #define MXWH_ListViewKey MX_TagBase+0x21
- #define MXWH_RAWKEYleft MX_TagBase+0x22
- #define MXWH_RAWKEYright MX_TagBase+0x23
- #define MXWH_CloseWindow MX_TagBase+0x24
- #define MXWH_ReturnKeyMode MX_TagBase+0x25
- #define MXWH_ReturnKeyData MX_TagBase+0x26
- #define MXWH_RelativeZeroBase MX_TagBase+0x27
- #define MXWH_FloodRast MX_TagBase+0x2a
- #define MXWH_Borderless MX_TagBase+0x30
- #define MXWH_LastStringUp MX_TagBase+0x31
- #define MXWH_LastStringUpData MX_TagBase+0x32
- #define MXWH_SetWindowHook MX_TagBase+0x33
- #define MXWH_GetWindowHook MX_TagBase+0x34
- #define MXWH_UserData MX_TagBase+0x35
- #define MXWH_WindowPointer MX_TagBase+0x36
- #define MXWH_PreCloseCall MX_TagBase+0x37
- #define MXWH_UseParentPort MX_TagBase+0x38
- #define MXWH_CloseWindowHook MX_TagBase+0x39
- #define MXWH_CustomData MX_TagBase+0x40
- #define MXWH_CustomDataSize MX_TagBase+0x41
- #define MXWH_CustomDataDefault MX_TagBase+0x4
- #define MXWH_ZoomGadget MX_TagBase+0x43
- #define MXWH_VisualInfo MX_TagBase+0x48
- #define MXWH_ASLInfo MX_TagBase+0x50
- #define MXWH_ASLFont MX_TagBase+0x51
- #define MXWH_BackupMem MX_TagBase+0x52
- #define MXWH_RemakeWindowHook MX_TagBase+0x53
- #define MXWH_DataPtr MX_TagBase+0x54
- #define MXWH_CatCompArray MX_TagBase+0x5A
- #define MXWH_Locale MX_TagBase+0x5B
- #define MXWH_Catalog MX_TagBase+0x5C
- #define MXWH_LocaleName MX_TagBase+0x5D
- #define MXWH_CatalogName MX_TagBase+0x5E
- #define MXWH_WindowTitleMSGID MX_TagBase+0x5F
- #define MXWH_Font MX_TagBase+0x60
- #define MXWH_WHStore MX_TagBase+0x62
- #define MXWH_WindowHandlerStore MXWH_WHStore
- #define RETMODE_NONE 0x00000000
- #define RETMODE_RETURNVAL 0x80000001
- #define RETMODE_QUITREVERT 0x80000002
- #define RETMODE_HOOK 0x80000003
- #define RETMODE_LIST 0x80000004
-
- #define LOADFIB_LOCK 0
- #define LOADFIB_FILEHANDLE 1
- #define LOADFIB_NAME 2
-
-
- struct MxIffHunk {
- ULONG Name;
- ULONG Type;
- ULONG Data1;
- ULONG Data2;
- };
-
- struct MxBoxC {
- struct Node Node;
- APTR Hook;
- WORD X;
- WORD Y;
- WORD W;
- WORD H;
- struct TagItem *Tags;
- ULONG res;
- };
-
-
-
- /*****************************************************************************/
- /* CONSTANTS for LISTVIEW Gadget */
-
- /* The callback hooks used here are not implemented very well. They will be
- replacted by V25 matrix.library with proper struct Hook * hooks. */
-
- #define MXLV_GadtoolsTags MX_TagBase+0x8001
- #define MXLV_List MX_TagBase+0x8002
- #define MXLV_HookSingleClick MX_TagBase+0x8003
- #define MXLV_HookDoubleClick MX_TagBase+0x8004
- #define MXLV_StoreNodeNum MX_TagBase+0x8005
- #define MXLV_StoreNodeAddr MX_TagBase+0x8006
- #define MXLV_StoreNodeText MX_TagBase+0x8007
- #define MXLV_ShowSelected MX_TagBase+0x8008
- #define MXLV_ExitOn2Click MX_TagBase+0x8009
- #define MXLV_Disabled MX_TagBase+0x800a
- #define MXLV_KeyNavigate MX_TagBase+0x800b
- #define MXLV_NewSelectEntry MX_TagBase+0x800c
-
-
-
-
- #define MXNI_Comment MX_TagBase+0xB001
- #define MXNI_Data MX_TagBase+0xB002
- #define MXNI_Error MX_TagBase+0xB003
- #define MXNI_SigTask MX_TagBase+0xB004
- #define MXNI_SigMask MX_TagBase+0xB005
-
- #define MXNI_ERR_OK 0
- #define MXNI_ERR_NOMEMORY 1
- #define MXNI_ERR_NOTUNIQUE 2
-
- struct MxNameInfo {
- struct Node Node; /* Standard exec node */
- struct SignalSemaphore Semaphore; /* Exec semaphore for access arbitration */
- struct Task *SigTask; /* Task to signal to kill node */
- ULONG SigMask; /* Signal mask to kill node */
- STRPTR Comment; /* Comment about node, may be NULL */
- APTR Data; /* Application specific data field */
- };
-
-
- /*****************************************************************************/
- /* TAGS for MX_SetConfig() */
- #define MXCFG_GadgetHeight MX_TagBase+0xBA01
-
- /*****************************************************************************/
- /* CONSTANTS for MXCFG_GadgetHeight */
- #define MX_GADHEIGHT_NORMAL 0
- #define MX_GADHEIGHT_SMALL 1
- #define MX_GADHEIGHT_TALL 2
-
-
-
-
- /*****************************************************************************/
- /* CONSTANTS for MX_LogMsg() */
-
- #define MXLOGTASK_UNKNOWN 0
- #define MXLOGTASK_APPLICATION 1
- #define MXLOGTASK_DAEMON 2
-
- #define MXLOGMESG_UNKNOWN 0
- #define MXLOGMESG_GENERAL 1
-
-
- #endif /* LIBRARIES_MXBASE_H */
-
-
-